package com.cpa.admin.controller;

import com.cpa.admin.config.BaseController;
import com.cpa.admin.config.WebSecurityConfig;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author zhen.zhao01
 * @CreateDate 2018/10/31
 */
@Controller
@RequestMapping("/")
public class IndexController extends BaseController {


    @GetMapping
    public String index(HttpServletRequest request, HttpSession session){
        request.setAttribute("loginUser",session.getAttribute(WebSecurityConfig.SESSION_KEY));

        return "index";
    }


}
